import request from '@/utils/request'
import {praseStrEmpty} from "../../../utils/project";

// 查询缴费记录列表
export function listRecord(query) {
    return request({
        url: '/server/payRecord/list',
        method: 'get',
        params: query
    })
}

// 查询缴费记录详细
export function getRecord(payId) {
    return request({
        url: '/server/payRecord/' + praseStrEmpty(payId),
        method: 'get'
    })
}

// 新增缴费记录
export function addRecord(data) {
    return request({
        url: '/server/payRecord',
        method: 'post',
        data: data
    })
}

// 修改缴费记录
export function updateRecord(data) {
    return request({
        url: '/server/payRecord',
        method: 'put',
        data: data
    })
}

// 删除缴费记录
export function delRecord(payId) {
    return request({
        url: '/server/payRecord/' + payId,
        method: 'delete'
    })
}

// 导出缴费记录
export function exportRecord(query) {
    return request({
        url: '/server/payRecord/export',
        method: 'get',
        params: query
    })
}

// 下载缴费记录导入模板
export function importTemplate() {
  return request({
    url: '/server/payRecord/importTemplate',
    method: 'get'
  })
}
